<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<form action="<?php echo url_for('admin_reservations_edit',array('action'=>($form->getObject()->isNew() ? 'create' : 'update'), 'id'=>(!$form->getObject()->isNew() ? $form->getObject()->getId() : ''))) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
  <table>
    <tfoot>
      <tr>
        <td colspan="2">
          <?php echo $form->renderHiddenFields(false) ?>
          &nbsp;<a href="<?php echo url_for('admin_reservations') ?>">Back to list</a>
          <input type="submit" class="btn btn-success" value="Save" />
        </td>
      </tr>
    </tfoot>
    <tbody>
      <?php echo $form->renderGlobalErrors() ?>
      <tr>
        <th><?php echo $form['contact_firstname']->renderLabel() ?></th>
        <td>
          <?php echo $form['contact_firstname']->renderError() ?>
          <?php echo $form['contact_firstname'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['contact_lastname']->renderLabel() ?></th>
        <td>
          <?php echo $form['contact_lastname']->renderError() ?>
          <?php echo $form['contact_lastname'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['contact_email']->renderLabel() ?></th>
        <td>
          <?php echo $form['contact_email']->renderError() ?>
          <?php echo $form['contact_email'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['contact_phone']->renderLabel() ?></th>
        <td>
          <?php echo $form['contact_phone']->renderError() ?>
          <?php echo $form['contact_phone'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['contact_address']->renderLabel() ?></th>
        <td>
          <?php echo $form['contact_address']->renderError() ?>
          <?php echo $form['contact_address'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['contact_city']->renderLabel() ?></th>
        <td>
          <?php echo $form['contact_city']->renderError() ?>
          <?php echo $form['contact_city'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['contact_country']->renderLabel() ?></th>
        <td>
          <?php echo $form['contact_country']->renderError() ?>
          <?php echo $form['contact_country'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['status']->renderLabel() ?></th>
        <td>
          <?php echo $form['status']->renderError() ?>
          <?php echo $form['status'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['amount']->renderLabel() ?></th>
        <td>
          <?php echo $form['amount']->renderError() ?>
          <?php echo $form['amount'] ?>
        </td>
      </tr>
    </tbody>
  </table>
</form>
